package com.auxgroup.smarthome.openapi.responsebody;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * Created by Toby Lai on 2017/6/13.
 */
@JsonIgnoreProperties({"error_code", "error_message"})
public abstract  class AbstractErrorBody {
    protected String error_message;
    protected String error_code;

    @JSONField(serialize = false)
    public String getError_message() {
        return error_message;
    }

    public void setError_message(String error_message) {
        this.error_message = error_message;
    }

    @JSONField(serialize = false)
    public String getError_code() {
        return error_code;
    }

    public void setError_code(String error_code) {
        this.error_code = error_code;
    }

    public AbstractErrorBody createErrorMsg(String error_message, String error_code){
        this.error_message = error_message;
        this.error_code = error_code;
        return this;
    }

}
